/***************************************************************** 
 *
 * FILE        : main.c
 * 
 * DESCRIPTION : This file is the main program for the UTCH RAPTOR
 *               using the MPC5604B
 *	             
 *               
 * 
 * COPYRIGHT   :(c) 2009, Freescale & STMicroelectronics 
 * 
 * VERSION     : 01.00 
 * DATE        : 26 SEPTEMBER 2012 
 * AUTHOR      : UTCH RAPTOR TEAM
 * HISTORY     :  
 *               
 *
 ******************************************************************/ 


#include "MPC5604B_M27V.h"
#include "System_inits.h"
#include "Pads_names.h"
#include "Alt_functions.h"
//#include "Var_declaration.h"
#include "EMIOS_0_conf.h"
#include "ADC_conf.h"
extern vuint32_t speed;
void main(void) {

System_inits_all();  /*All the initialitations*/
initEMIOS_0();
initEMIOS_0_chs();
ADC_configuration();
Pad_configuration();
EN_MOTORL=1;
EN_MOTORD=1;
while(1)
{
Speed_control(/*50,70*/);
Camera_frame();
//Black_limits(0,127);
//Linear_frame();
Pixel_conversion();
Frame_cleaning();
Center_detection();
Frame_view(10); //Parameter in us, this will be the time betwen pixels
Direction_control();
Light_module();


}


}



